<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@include file="/context/mytags.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta charset="UTF-8" />
<title>Highcharts 教程 | 菜鸟教程(runoob.com)</title>
<script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="https://code.highcharts.com/highcharts.js"></script>
<script type="text/javascript">
	// 项目访问根目录
	var webRoot = '${webRoot}';
</script>
</head>
<body>
	<div id="containertu"
		style="width: 100%; height: 300px; margin: 0 auto; left: 0px;"></div>
	<script language="JavaScript">
		$(document)
				.ready(
						function() {

							$
									.ajax({
										type : 'post',
										url : webRoot + '/ordert/indexShow1',
										dataType : 'json',
										success : function(data) {

											var arrsss = [];
											arrsss = data.arr

											var chart = {
												type : 'column'
											};
											var title = {
												text : '每月平均销量'
											};
											var subtitle = {
												text : ''
											};
											var xAxis = {
												categories : data.arryear,
												crosshair : true
											};
											var yAxis = {
												min : 0,
												title : {
													text : ''
												}
											};
											var tooltip = {
												headerFormat : '<span style="font-size:10px">{point.key}</span><table>',
												pointFormat : '<tr><td style="color:{series.color};padding:0">{series.name}: </td>'
														+ '<td style="padding:0"><b>{point.y:.1f}</b></td></tr>',
												footerFormat : '</table>',
												shared : true,
												useHTML : true
											};
											var plotOptions = {
												column : {
													pointPadding : 0.2,
													borderWidth : 0
												}
											};
											var credits = {
												enabled : false
											};

											var series = [ {
												name : '销量',
												data : arrsss
											} ];

											var json = {};
											json.chart = chart;
											json.title = title;
											json.subtitle = subtitle;
											json.tooltip = tooltip;
											json.xAxis = xAxis;
											json.yAxis = yAxis;
											json.series = series;
											json.plotOptions = plotOptions;
											json.credits = credits;
											$('#containertu').highcharts(json);

										}
									});

						});
	</script>
</body>
</html>
